	<#include "head.html"/>
<SCRIPT type="text/javascript">
	$(document).ready(function(){
		
		var ztree = $.fn.zTree.init($(document.getElementById("zTree_adminLIst")), setting, zNodes1);
		ztree.selectNode(ztree.getNodeByParam("id", "taskpassed", null));
		var data = [${successcount!'0'}, ${faildcount!'0'}, ${cancelcount!'0'}];
		var category = [
                    '成功',
                    '失败',
                    '取消'
                ];
		createBarChart("#container" , "bar" , data , category , "合计（${allcount!'0'}）");		
		var pieData = [
                ['成功', ${successcount!'0'}],
                ['失败',  ${faildcount!'0'}],
                ['取消',  ${cancelcount!'0'}]
            ]
		createPieChart("#piecontainer" ,  pieData );
		
	});
	
</SCRIPT>
<div class="rs_layout_top breadCrumbWrap">
	<div class="breadCrumbStart">您当前的位置是在：</div>
	<ul class="breadCrumb">
		<li class="bc_ithems"><a href="/${orgi}/manage/task/taskpassing.html">系统管理</a></li>
		<li class="bc_ithems"><a href="/${orgi}/manage/task/taskpassing.html">状态</a></li>
	</ul>

</div>
<div class="rs_layout_left" resizable="true" style="width:230px;">
	<div class="lftTreeWrap">
		<div class="task_title2">状态</div>
		<div class="ztree" id="zTree_adminLIst"></div>
		<div class="rs_layout_top" style="font-size: 12px" id="filterDiv">
		<form id="searchForm" action="/${orgi}/manage/task/taskpassed.html" method="post">	
		
			<input type="hidden" id="beginNum" name="beginNum" value="">
			<input type="hidden" id="endNum" name="endNum" value="">
			<input type="hidden" id="action" name="action" value="current">
			
			<div class="task_title2">过滤器</div>	
			<div style="padding-left: 20px;padding-top: 10px;">
					<input type="radio" onclick="timeEnable()" <#if timeType??><#if timeType??&&timeType=='1'>checked="checked"</#if><#else>checked="checked"</#if> name="timeType" value="1"> 
					<select <#if timeType??&&timeType=='2'>disabled="disabled"</#if> id="times" name="times">
						<option <#if times??&&times=='4'>selected="selected"</#if> value="4">过去4小时</option>
						<option <#if times??&&times=='8'>selected="selected"</#if> value="8">过去8小时</option>
						<option <#if times??&&times=='12'>selected="selected"</#if> value="12">过去12小时</option>
						<option <#if times??&&times=='24'>selected="selected"</#if> value="24">过去24小时</option>
						<option <#if times??&&times=='168'>selected="selected"</#if> value="168">过去7天</option>
						<option <#if times??&&times=='720'>selected="selected"</#if> value="720">过去30天</option>
						<option <#if times??&&times=='8760'>selected="selected"</#if> value="8760">过去365天</option>
					</select>
					
					<div style="margin-top: 10px;">
					<label><input type="radio" onclick="timeEnable()" <#if timeType??&&timeType=='2'>checked="checked"</#if> style="float: left;" name="timeType" value="2">&nbsp;&nbsp;开始时间：</label>
						<div style="margin-left: 30px">
							<input class="Wdate" type="text" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')}'})" <#if timeType??&&timeType=='1'>disabled="disabled"</#if>  id="beginTime" name="beginTime" style="margin-top: 5px;width:145px;" value="${beginTime!''}">
							<br>
							结束时间：<br><input class="Wdate" type="text" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginTime\')}'})" <#if timeType??&&timeType=='1'>disabled="disabled"</#if>  id="endTime" name="endTime" style="margin-top: 5px;width:145px;" value="${endTime!''}">
						</div>
					
					</div>
			
					
					<div style="margin-top: 10px;">
					用户：<span id="usernametext">${username!'任意'}<#if username??&&username==''>任意</#if></span>
						<div style="margin-left: 30px;">
							
							<input type="hidden" name="userid" id="userid" value="${userid!''}">
							<input type="hidden" name="username" id="username" value="${username!''}">
							<br>
							<i style="color: #0000CC;" data-toggle="ajax" id="newreport" href="/rivues/manage/role/userselect.html" data-width="565" title="选择用户">选择用户...</i>
						</div>
					
					</div>
					
					
					<div style="margin-top: 10px;">
					报表：<span id="reportnametext">${reportname!'任意'}<#if reportname??&&reportname==''>任意</#if></span><br><br>
					目录：<span id="dicnametext">${dicname!'任意'}<#if dicname??&&dicname==''>任意</#if></span>
						<div style="margin-left: 30px;">
							
							<input type="hidden" name="reportid" id="reportid" value="${reportid!''}">
							<input type="hidden" name="reportname" id="reportname" value="${reportname!''}">
							<input type="hidden" name="dicid" id="dicid" value="${dicid!''}">
							<input type="hidden" name="dicname" id="dicname" value="${dicname!''}">
							<br>
							<i style="color: #0000CC;" data-toggle="ajax" id="newreport" href="/${orgi}/user/report/pub/reportselect.html" data-width="565" title="选择报表">选择报表...</i>
						</div>
					
					</div>
				
					<div style="margin-top: 10px;">
						<label>状态：</label>
						<select name="resulttype">
							<option  value="">任意</option>
							<option <#if resulttype??&&resulttype=='1'>selected="selected"</#if> value="1">成功</option>
							<option <#if resulttype??&&resulttype=='2'>selected="selected"</#if> value="2">失败</option>
							<option <#if resulttype??&&resulttype=='3'>selected="selected"</#if> value="3">取消</option>
						</select>
					</div>
					
					<div style="margin-top: 10px;">
						<label>优先级：</label>
						<select name="priority">
							<option  value="">任意</option>
							<option <#if priority??&&priority=='1'>selected="selected"</#if>  value="1">1</option>
							<option <#if priority??&&priority=='2'>selected="selected"</#if>  value="2">2</option>
							<option <#if priority??&&priority=='3'>selected="selected"</#if> value="3">3</option>
							<option <#if priority??&&priority=='4'>selected="selected"</#if> value="4">4</option>
							<option <#if priority??&&priority=='5'>selected="selected"</#if> value="5">5</option>
						</select>
					</div>

			</div>
			<div style="text-align: center;margin-top: 10px;background: #ddd;padding: 5px 0px;">
				<input class="subButtonStyle" style="margin:0px auto;" type="submit" value="应用">
			</div>
			</form>
		</div>
	</div>
</div>
<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">
		<div class="rs_layout_top" style="height:180px; overflow:hidden; border-bottom: solid 1px #d7d7d7;">
			<div class="rs_layout">
				<div class="rs_layout_center">
					<div class="rs_layout">
						<div class="rs_layout_top" >
							<div class="task_title2">过去的活动</div>
							<div class="row-fluid">
								<div class="span7"><div id="container" style="width: 90%; height: 140px;"></div></div>
								<div class="span4"><div id="piecontainer" style="width: 100%; height: 160px;margin:0 0 0 auto;"></div></div>
							</div>
							
						</div>
						
					</div>
				</div>
			</div>
		</div>
		<div class="rs_layout_center">
			
			<div class="tableScrollWrap">
					
				<table class="table_style_1">
					<thead>
						<tr>
							<th style="width:20px;">&nbsp;</th>
							<th><i class="verMidWrap">名称（目录）</i><i class="tbArrow"></i></th>
							<th><i class="minSize">执行时间</i><i class="tbArrow"></i></th>
							<th><i class="minSize">执行人</i><i class="tbArrow"></i></th>
							<th class="minSize">优先级</th>
							<th class="minSize">状态</th>
							<th class="minSize">操作</th>
						</tr>
					</thead>
					<tbody>
						
						<#if historytasks??>
						<#list historytasks as task>
						<tr>
							<td>&nbsp;</td>
							<td><a data-toggle="ajax" id="taskdetail" data-width="750"  title="${task.name!'任务详情'}" href="/${orgi}/manage/task/${task.id!''}/taskruninglist.html"><i class="icons_tablelist_task"></i>${task.name!''}</a></td>
							<td class="minSize">${task.starttime?string("yyyy年MM月dd HH:mm:ss")}</td>
							<td class="minSize">${task.username!''}(${task.nickname!''})</td>
							<td class="minSize">
								${task.priority!''}
							</td>
							<td class="minSize">
								<#if task.resulttype==1>成功<#elseif task.resulttype==2>失败&nbsp;&nbsp;<img alt="" src="/assets/images/msg_error_8.gif"> <#elseif task.resulttype==3>已取消<#else>原因不明</#if>
							</td>
							
							<td class="minSize">
								<i data-width="750" title="查看明细" href="/${orgi}/manage/task/${task.id}/taskdetail.html" id="taskdetail" data-toggle="ajax" class="tbControlIcon tci-12"></i>
							</td>
						</tr> 
						</#list>
						</#if>
					</tbody>
				</table>
			</div>

		</div>
		<div class="rs_layout_bottom">
			<#include "../../public/pagination.html"/>
		</div>

	</div>
</div>
